package com.hsjk.szwj.module.train.api;

import com.hsjk.szwj.module.train.api.dto.MemberServiceMappingDTO;
import com.hsjk.szwj.module.train.convert.ServiceConvert;
import com.hsjk.szwj.module.train.dal.mysql.service.IMemberServiceMappingMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/09/04 23:15
 **/
@Service
public class MemberServiceApiImpl implements IMemberServiceApi {

    @Resource
    private IMemberServiceMappingMapper memberServiceMappingMapper;

    @Override
    public int createMemberServiceMapping(MemberServiceMappingDTO memberServiceMappingDTO) {
        return memberServiceMappingMapper.insert(ServiceConvert
                .INSTANCE.convertMemberServiceMappingDO(memberServiceMappingDTO));
    }
}
